/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Model;

import java.io.Serializable;

/**
 *
 * @author Anthares
 */
public class BasketLine implements Serializable{
    private int quantity;

    private Produit product;

    public BasketLine(int quantity, Produit product) {
        this.quantity = quantity;
        this.product = product;
    }

    public int getQuantity() {
        return quantity;
    }

    public Produit getProduct() {
        return product;
    }

    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }

    public Integer getKey() {
        return product.getProdId();
    }

    public double getLinePrice() {
        return product.getReducedPrice() * quantity;
    }

    public void addQuantity() {
        this.quantity++;
    }

    public void addQuantity(int quant) {
        this.quantity += quant;
    }
}
